<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div class="item">十堰市万达</div>
    <script>
      let item = document.querySelector(".item");
      console.log(item.getAttribute("class"));   
      item.setAttribute("userName", "inp");
      console.log(item.getAttribute("userName"));
      item.removeAttribute("userName");
    </script>
  </body>
</html>
